/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ucab.desarrollo.viajesbook.actions;

import com.opensymphony.xwork2.ActionSupport;
import java.util.ArrayList;
import java.util.List;

/**
 *
 * @author isak
 */
public class AutoCompleterAction extends ActionSupport {

    private String select;
    private String selectKey;
    private List<String> options = new ArrayList<String>();
    private static final long serialVersionUID = -8481638176160014396L;

    @Override
    public String execute() throws Exception {
        if ("Venezuela".equals(select)) {
            options.add("apple");
            options.add("banana");
            options.add("grape");
            options.add("pear");
        } else if ("Aruba".equals(select)) {
            options.add("red");
            options.add("green");
            options.add("blue");
        }
        return SUCCESS;
    }

    public String getSelect() {
        return select;
    }

    public void setSelect(String select) {
        this.select = select;
    }

    public List<String> getOptions() {
        return options;
    }

    /**
     * @return the selectKey
     */
    public String getSelectKey() {
        return selectKey;
    }

    /**
     * @param selectKey the selectKey to set
     */
    public void setSelectKey(String selectKey) {
        this.selectKey = selectKey;
    }


    
}
